package main

import (
	"github.com/labstack/echo/v4"
	"github.com/labstack/echo/v4/middleware"
	"golang.org/x/time/rate"
)

func main() {
	e := echo.New()
	//The example below will limit the application to 1 requests/sec using the default in-memory store:
	e.Use(middleware.RateLimiter(middleware.NewRateLimiterMemoryStore(rate.Limit(1)))) //{"message":"rate limit exceeded"}
	e.GET("/index", Index)
	e.Start(":80")
}
func Index(c echo.Context) error {
	return c.String(200, "hello world-8081")
}
